<template>
  <div class="productProduct">
    <!-- 产品 -->
    <div class="info">
      <div class="price">
        <div class="priceNew fz18">￥{{ item.price }}</div>
        <div class="price_des fz12">
          <span class="priceOld "
            >原价：<del>￥{{ item.oldPrice }}</del></span
          >
          <span class="sell">已售:{{ item.sell }}</span>
        </div>
      </div>
      <div class="title eleto fz16">
        {{ item.name }}
      </div>
    </div>
  </div>
</template>

<script>
import { mapState } from 'vuex'
export default {
  name: 'productProduct',
  computed: {
    ...mapState('product', ['productItem'])
    // ...mapGetters('channel', ['optionalChannels'])
  },
  created() {
    // this.id = this.$route.query.id
    // console.log(this.id)
    this.item = this.$route.query
    // console.log(this.id)
  },
  data() {
    return {
      item: ''
    }
  },
  methods: {
    //   var newArray = oldArray.filter(function(val){return val<6;});

    getProduct() {
      //   this.item = productItem.filter(item => item.id === this.id)
    }
  }
}
</script>

<style lang="less" scoped>
.productProduct {
  width: 343px;
  height: 260px;
  padding: 12px 12px 16px 12px;
  .info {
    .price {
      display: flex;
      align-items: flex-end;
      height: 28px;
      position: relative;
      .priceNew {
        line-height: 28px;
        padding-right: 9px;
      }
      .price_des {
        height: 16px;
        line-height: 16px;
        .sell {
          position: absolute;
          right: 0;
        }
      }
    }
    .title.eleto {
      margin-top: 10px;
    }
  }
}
</style>
